/*
 *  Trie.h
 *  Trie
 *
 *  Created by Ariel  Rodriguez on 26/04/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */


#include <string>
#include "TrieNode.h"
#include "Key.h"



typedef map<char, TrieNode* > nodo;

class Trie{

	public:
		Trie(void);
		TrieNode * getRoot(void);
		void setRoot(TrieNode *);
		void insertKey(Key);
		long int searchRegistry(char *);
		
		
	
	private:
		TrieNode * root;
		// inner function: insert a key 
		void recursiveInsert(long int ,TrieNode *,char *);
		void recursiveSearch(TrieNode * , long int & , char *);
}; 
